#pragma once

#include <iostream>
#include <functional>
#include <unistd.h>
#include <string>
#include <cstring>
#include <sys/socket.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include "logger.hpp"

enum INFO_ERR
{
    OK=0,
    GET_SOCKET_ERR,
    BIND_ERR,
    LISTEN_ERR,
    INPUT_ERR,
    CONNECT_ERR
};

#define TO_SOCKADDR(SOCKIN) ((struct sockaddr*)(&(SOCKIN)))